From: Paul Eggert Date: Mon, 21 Feb 2011 23:22:34 +0000 (-0800) Subject: [ChangeLog] X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~4667^2~3 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9be2f8d7056996d47e0e4f38c9e26339844a896a;p=emacs.git [ChangeLog] * lib/min-max.h: New file, for "min" and "max". [lib-src/ChangeLog] New file "lib/min-max.h". * ebrowse.c (min, max): Define them by including instead of defining it ourselves. * pop.c (min): Likewise. --- diff --git a/ChangeLog b/ChangeLog index db173ddd9a1..ef876b6e831 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-02-21 Paul Eggert + + * lib/min-max.h: New file, for "min" and "max". + 2011-02-20 Paul Eggert Import filemode module from gnulib. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3e02c9afb5e..84319916b4f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,10 @@ 2011-02-21 Paul Eggert + New file "lib/min-max.h". + * ebrowse.c (min, max): Define them by including + instead of defining it ourselves. + * pop.c (min): Likewise. + * movemail.c (popmail): Report fchown failure instead of ignoring it. But if the file already has the right ownership, don't worry about it. diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 2cb656ae53a..f2894d5a0c2 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -41,12 +41,7 @@ along with GNU Emacs. If not, see . */ #define streq(X, Y) (*(X) == *(Y) && strcmp ((X) + 1, (Y) + 1) == 0) -/* The ubiquitous `max' and `min' macros. */ - -#ifndef max -#define max(X, Y) ((X) > (Y) ? (X) : (Y)) -#define min(X, Y) ((X) < (Y) ? (X) : (Y)) -#endif +#include /* Files are read in chunks of this number of bytes. */ diff --git a/lib-src/pop.c b/lib-src/pop.c index 159926e97b0..426b39bd1fb 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -90,6 +90,8 @@ extern struct servent *hes_getservbyname (/* char *, char * */); # endif #endif /* KERBEROS */ +#include + #ifdef KERBEROS #ifndef KERBEROS5 extern int krb_sendauth (/* long, int, KTEXT, char *, char *, char *, @@ -130,10 +132,6 @@ static char *find_crlf (char *, int); char pop_error[ERROR_MAX]; int pop_debug = 0; -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - /* * Function: pop_open (char *host, char *username, char *password, * int flags) diff --git a/lib/min-max.h b/lib/min-max.h new file mode 100644 index 00000000000..997cdd191eb --- /dev/null +++ b/lib/min-max.h @@ -0,0 +1,6 @@ +#ifndef min +# define min(a,b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef max +# define max(a,b) ((a) > (b) ? (a) : (b)) +#endif